package SickModel.Classes;

import java.net.InetAddress;

/**
 *
 * @author Pozytywny!
 */
public class NameIPPort implements INameIPPort {
    private String _name;
    private InetAddress _addres;
    private Integer _port;

    public Boolean equals(INameIPPort host) {
        if(_name.equals(host.getName())
                && _addres.equals(host.getIP())
                && _port == host.getPort())return Boolean.TRUE;
        else return Boolean.FALSE;
    }

    public Integer getPort() {
        return _port;
    }

    public InetAddress getIP() {
        return _addres;
    }

    public String getName() {
        return _name;
    }

    public void setNameIPPort(String name, InetAddress ip, Integer port) throws Exception {
        _name = name;
        _addres = ip;
        _port = port;
    }
}
